
// Begin:@Package@::@Class@
namespace message_traits {
    template <>
    struct MD5Sum<@Package@::@Class@> {
        static const char* value() {
            return "@Checksum@";
        }
        static const char* value(@Package@::@Class@ const& o) {
            return value();
        }
    };

    template <>
    struct DataType<@Package@::@Class@> {
        static const char* value() {
            return "@Package@/@Class@";
        }
        static const char* value(@Package@::@Class@ const& o) {
            return value();
        }
    };

    template <>
    struct Definition<@Package@::@Class@> {
        static const char* value() {
            return "@Package@/@Class@";
        }
        static const char* value(@Package@::@Class@ const& o) {
            return value();
        }
    };
}  // namespace message_traits

namespace serialization {
    template <>
    struct Serializer<@Package@::@Class@> {
        template <typename Stream>
        inline static void write(Stream& stream, @Package@::@Class@ const& o) {
            std::string ser_bytes;
            if (!o.SerializeToString(&ser_bytes)) {
                std::cerr << "Serialization failed[@Package@::@Class@]" << std::endl;
                return;
            }
            memcpy(stream.advance(ser_bytes.size()), ser_bytes.c_str(), ser_bytes.size());
        }

        template <typename Stream>
        inline static void read(Stream &stream, @Package@::@Class@ &o) {
            std::string deser_bytes;
            deser_bytes.resize(stream.getLength());
            memcpy(&deser_bytes[0], stream.advance(stream.getLength()),stream.getLength());
            if (!o.ParseFromString(deser_bytes)) {
                std::cerr << "Deserialization failed[@Package@::@Class@]" << std::endl;
                return;
            }
        }

        inline static uint32_t
        serializedLength(@Package@::@Class@ const &o) {
            return o.ByteSizeLong();
        }
    };
}  // namespace serialization
// End:@Package@::@Class@
